#include "ros/ros.h"
#include "geometry_msgs/Twist.h"
int main(int argc, char **argv)
{
    ros::init(argc, argv, "pub_twist");
    ros::NodeHandle n;
    ros::Publisher pub = n.advertise<geometry_msgs::Twist>("/turtle1/cmd_vel", 10);

    ros::Rate loop_rate(10);
    geometry_msgs::Twist twist;
    twist.linear.x = 0.5;
    twist.linear.y = 0;
    twist.linear.z = 0;

    twist.angular.x = 0;
    twist.angular.y = 0;        
    twist.angular.z = 0.5;

    while (ros::ok())
    {
        pub.publish(twist);
        ros::spinOnce();
        loop_rate.sleep();
    }
}